﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GameServer.Tools;

namespace GameServer.Plugins
{
    public class PluginManager
    {
        private Dictionary<String, Plugin> Plugins = new Dictionary<String, Plugin>();

        public PluginManager()
        {

        }

        public bool LoadPlugin(string filename)
        {
            return false;
        }

        public bool UnloadPlugin(string pluginName)
        {
            if (!Plugins.ContainsKey(pluginName))
            {
                try
                {
                    throw new Exceptions.PluginNotLoadedException(pluginName + " was not loaded, cannot unload.");
                }
                catch (Exceptions.PluginNotLoadedException pnle)
                {
                    Logger.Log(LevelType.WARNING, pnle.Message);
                }
            }
            return false;
        }
    }
}
